package com.wenxixuanwu.fruitstore.controller;

import com.wenxixuanwu.fruitstore.entity.Category;
import com.wenxixuanwu.fruitstore.entity.Product;
import com.wenxixuanwu.fruitstore.mapper.CategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private CategoryMapper categoryMapper;

    @RequestMapping("/select")
    public List<Category> select(){
        return categoryMapper.select();
    }


}
